from selenium import webdriver
from selenium.webdriver.common.by import By
from time import sleep
from options import options

url=r'http://192.168.126.131/upload/'
driver=webdriver.Chrome(options=options)
driver.get(url)
driver.maximize_window()

#登录
driver.find_element(By.ID,'ls_username').clear()
sleep(2)
driver.find_element(By.ID,'ls_username').send_keys('admin')
driver.find_element(By.ID,'ls_password').clear()
sleep(2)
driver.find_element(By.ID,'ls_password').send_keys('123456')
sleep(3)
driver.find_element(By.XPATH,'//*[@id="lsform"]/div/div/table/tbody/tr[2]/td[3]/button/em').click()
sleep(3)
#退出登录
driver.find_element(By.LINK_TEXT,'退出').click()
sleep(6)

